package org.neptune.service.util;

import java.io.Serializable;
import java.util.Date;

import org.neptune.common.constant.NeptuneConstant;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @author lwl
 * @date 2019/12/3 16:15
 */
@Document(indexName = NeptuneConstant.ESLOGBEAN_INDEX_NAME, type = "esLogBean")
// 标记为文档类型，indexName：对应索引库名称type：对应在索引库中的类型，shards：分片数量，replicas：副本数量
public class EsLogBean implements Serializable {

	private static final long serialVersionUID = 4985318688222467168L;

	@Id // 主键
	private String id;

	@Field(type = FieldType.Text)
	private String title;

	@Field(type = FieldType.Text)
	private String logType;

	@Field(type = FieldType.Text, analyzer = "ik")
	private String content;

	@Field(type = FieldType.Date)
	private Date createTime;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getLogType() {
		return logType;
	}

	public void setLogType(String logType) {
		this.logType = logType;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
}
